<template>
	<view v-if="isBall" class="ptVideo">
		<video object-fit="fill" :src="videoUrl" autoplay></video>
	</view>
	<view v-else class="footVideo">
		<web-view :src="`http://lwwtest.xuzhouzhihui.com/?url=${videoUrl}`"></web-view>
	</view>
</template>

<script>
	export default {
		data () {
			return {
				isBall: false,
				message: {},
				videoType: 'm3',
				id:'',
				videoUrl: '',
				baseUrl: ''
			}
		},
		onLoad(option) {
			this.baseUrl = JSON.parse(decodeURIComponent(option.item))
			uni.setNavigationBarTitle({
				title: this.baseUrl.name
			})
		},
		onShow() {
			this.init()
		},
		methods: {
			init () {
				this.videoUrl = this.baseUrl.url
			}
		}
	}
</script>

<style lang="scss" scoped>
	.ptVideo {
		width: 100%;
		video {
			width: 100%;
		}
	}
</style>